While I was waiting for Spotify to send me my data, I started playing
around with Spotify’s API by using the spotifyr
package.
The spotifyr package allows you to pull up to 50 of your
top artists and the genres associated with each of them. For this first
part, I was curious about which genres appeared most frequently among my
50 most listened to artists.
## Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
## ℹ Please use the `linewidth` argument instead.
I also discovered that Spotify’s API provides interesting metrics on all songs (ex. valence, danceability, liveness).
First things first, I wanted to see the average of these metrics for all 2,000+ songs in one of my playlists (aka Tune Void).
## danceability energy loudness speechiness
## 0.55626345 0.65857394 -7.19828373 0.05693734
## acousticness instrumentalness liveness valence
## 0.25191763 0.05610170 0.18387893 0.52342722
## tempo
## 121.98788817
Next, I wanted to see how the features of the songs in this playlist related to each other. Correlation networks look cool, so I went with that.
## Correlation computed with
## • Method: 'pearson'
## • Missing treated using: 'pairwise.complete.obs'
Finally, I wanted to take the 50 most recently added songs from the Tune Void and see how those songs cluster together based on the metrics Spotify provides.
[write later]